/*
 * Copyright (c) 2022  by Junzhao
 * THIS FILE IS PART OF JAVASE Song Huongkang PROJECT
 * All Rights Reserved.
 */

package 字符串.String类.String与Char数组;

import org.junit.Test;

public class StringAndChar {
    public static void main(String[] args) {

    }
    @Test
    public void test01(){
        String s1 = "abc";
        char[] c1 = s1.toCharArray();
        for (char i :c1) {
            System.out.println(i);
        }

        char[] c2 = new char[]{'a','b','a','b'};
        String s2 = new String(c2);
        System.out.println(s2);
    }
}
